﻿using Jinjia.Approve.IRepository.JJFlow;
using Jinjia.Approve.IService.JJFlow.Approvers;
using JinJia.Core.Base.Exceptions;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Jinjia.Approve.Service.JJFlow.Approvers
{
    public class AdAcceptanceApprovers : IJJApprovers
    {
        private readonly IJJApproversRepository _jjApproversRepository;

        public AdAcceptanceApprovers(IJJApproversRepository jjApproversRepository)
        {
            _jjApproversRepository = jjApproversRepository;
        }

        public async Task<List<int>> GetInstanceNodeEmpInfo(string biz_order_id, int start_user = 0, string depart_id = "0", Dictionary<string, string> dic = null)
        {
            if (!int.TryParse(biz_order_id, out int master_id)) throw new ArgumentException("参数有误！");

            int transactUserId = _jjApproversRepository.GetAdAcceptanceTransactUserId(master_id);

            return await Task.FromResult(new List<int>() { transactUserId });
        }
    }
}
